\pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\b0\i0\ulnone\fs28\fc1\cf1 Q: Can I interpose a program of my own design in the midst of the power-off sequence?\
\
A: If the Workspace Manager is running, or if loginwindow is running, yes, you might be able to interpose something. If neither of these is running, no, there's nothing you can do.\
\
When you press the power key (on NeXT hardware), or select the one of the power-off options on non-NeXT hardware, the Workspace Manager or loginwindow then requests confirmation from the user; if the power-off is confirmed, both exec halt(8), passing it the -e and the -p options (eject disks, and power-off). You could replace\
\
/etc/halt\
\
with a program (compiled or shell script) of your own design, which would eventually exec the real halt. Note that it must pass along its arguments to the real halt.\